package mysql

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ HistoryCandlesticksInfoModel = (*customHistoryCandlesticksInfoModel)(nil)

type (
	// HistoryCandlesticksInfoModel is an interface to be customized, add more methods here,
	// and implement the added methods in customHistoryCandlesticksInfoModel.
	HistoryCandlesticksInfoModel interface {
		historyCandlesticksInfoModel
		withSession(session sqlx.Session) HistoryCandlesticksInfoModel
	}

	customHistoryCandlesticksInfoModel struct {
		*defaultHistoryCandlesticksInfoModel
	}
)

// NewHistoryCandlesticksInfoModel returns a model for the database table.
func NewHistoryCandlesticksInfoModel(conn sqlx.SqlConn) HistoryCandlesticksInfoModel {
	return &customHistoryCandlesticksInfoModel{
		defaultHistoryCandlesticksInfoModel: newHistoryCandlesticksInfoModel(conn),
	}
}

func (m *customHistoryCandlesticksInfoModel) withSession(session sqlx.Session) HistoryCandlesticksInfoModel {
	return NewHistoryCandlesticksInfoModel(sqlx.NewSqlConnFromSession(session))
}
